#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
using namespace std;

int Find(vector<int>& v1)
{
	int j = 0;

	for (int i : v1)
	{
		j ^= i;
	}

	return j;
}

int main()
{

	int n;
	cin >> n;
	vector<int> v1;

	for (int i = 0; i < n; i++)
	{
		int j;
		cin >> j;
		v1.push_back(j);
	}

	cout << Find(v1) << endl;

	return 0;
}